package com.decelo.jpa.result;

/**
 * 异常枚举参数列表
 * @author : JronZhang Create_Time:2018-12-29 19:34
 */
public enum ResultCode {

    CODE_200(200, "访问成功"),
    CODE_401(401, "非法请求，参数错误"),
    CODE_402(402, "未授权，accessToken过期或无效"),
    CODE_403(403, "Method使用错误，请查看API"),
    CODE_404(404, "找不到访问地址"),
    CODE_406(406, "没有权限访问"),
    CODE_500(500, "系统内部错误"),
    CODE_501(501, "对象已存在，请检测唯一性"),
    CODE_502(502, "当前版本与服务器版本不一致,请更新应用"),
    CODE_503(503, "对象不存在，请检测请求参数"),
    CODE_504(504, "服务器连接错误，请稍后重试"),
    CODE_505(505, "key校验失败"),
    CODE_506(506, "RPC服务连接失败，请稍后重试"),

    NO_FIND_ACCOUNT_ERRO(2001,"账号不存在"),
    ACCOUNT_PASSWORD_ERRO(2002,"账号或者密码错误"),
    ACCOUNT_COLD_ERRO(2003,"账号冻结,非法账号"),


    BASIC_ERRO(1001,"常规操作异常！"),
    BIND_ERRO(1002,"参数上传异常！"),
    METHOD_NOT_FIND_ERRO(1003,"方法没有找到异常！");

    ResultCode(Integer code, String msg){
        this.code=code;
        this.msg=msg;
    }

    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
